// org/x/casemodule/entity/ScheduleSyncEntity.java
package org.x.casemodule.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import org.apache.ibatis.type.StringTypeHandler;
import org.x.casemodule.enums.PlatformEnum;
import org.x.casemodule.enums.SyncDirectionEnum;

import java.lang.Long;
import java.util.Date;
import java.lang.Object;
import java.lang.String;

/**
 * 外部日历同步表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Data
@Table(value = "schedule_sync",dataSource = "caseDS")
public class ScheduleSyncEntity {

    /**
     * 同步ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 用户ID
     */
    @Column(value = "user_id")
    private Long userId;

    /**
     * 平台类型
     */
    @Column(value = "platform")
    private PlatformEnum platform;

    /**
     * 同步方向
     */
    @Column(value = "sync_direction")
    private SyncDirectionEnum syncDirection;

    /**
     * 认证令牌
     */
// 修改后
    @Column(value = "auth_token", typeHandler = StringTypeHandler.class)
    private String authToken;

    /**
     * 最后同步时间
     */
    @Column(value = "last_sync_time")
    private Date lastSyncTime;

    /**
     * 最后同步状态
     */
    @Column(value = "last_sync_status")
    private String lastSyncStatus;

    /**
     * 同步会话ID
     */
    @Column(value = "sync_session_id")
    private String syncSessionId;

    /**
     * 同步状态
     */
    @Column(value = "sync_status")
    private String syncStatus;

    /**
     * 同步开始时间
     */
    @Column(value = "sync_start_time")
    private Date syncStartTime;

    /**
     * 同步结束时间
     */
    @Column(value = "sync_end_time")
    private Date syncEndTime;

    /**
     * 同步结果详情
     */
    @Column(value = "sync_result")
    private String syncResult;

    /**
     * 错误信息
     */
    @Column(value = "error_message")
    private String errorMessage;

    /**
     * 日历ID
     */
    @Column(value = "calendar_id")
    private String calendarId;

    /**
     * 过滤条件
     */
    @Column(value = "filter_conditions")
    private String filterConditions;

    @Column(value = "create_time")
    private Date createTime;
}
